package com.myhouse.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.myhouse.entity.House;

public interface HouseDao {

	//房屋信息多条件分页查询
	List<House> houseTime(@Param("did")Integer did,@Param("sid")Integer sid,
			@Param("tid")Integer tid,@Param("title")String title,@Param("startPage")Integer startPage,
			@Param("pageSize")Integer pageSize,@Param("price")String price,@Param("updateTime")String updateTime,
			@Param("price1")Integer price1,@Param("price2")Integer price2);

	//房屋信息记录数
	int getRows(@Param("did")Integer did,@Param("sid")Integer sid,
			@Param("tid")Integer tid,@Param("title")String title,
			@Param("price1")Integer price1,@Param("price2")Integer price2);
	
	//房屋信息详情
	House getByHouse(int id);
	
	//添加房屋信息
	void addHouse(House house);
	
	//查询最贵租金的房屋信息
	List<House> getPriceHouse(int num);
	
	//查询最新几条更新的房屋信息
	List<House> getNewHouse(@Param("startNum")int startNum,@Param("num")int num);
	
	//按发布者查询房屋信息
	List<House> getUseridHouses(@Param("id")Integer id,@Param("startPage")Integer startPage,@Param("pageSize")Integer pageSize);
	int getUseridRows(int id);
	
	//修改
	void updateHouse(House house);
	
	//admin用的方法-->
	List<House> getHousesByDistrictId(int  districtId);
	//查询违规房屋信息 
	List<House> getAllHouses();
	//删除房屋信息
	void deleteViolationHouses(int id);

	
	
	
	
	
	
}
